import './index.less'
import { useEffect, useRef } from 'react'
import Danmu from './Danmu'
import Hls from 'hls.js'
import useHLS from './useHLS'

export default () => {
    const videoRef = useRef<HTMLVideoElement>(null);
    useHLS(videoRef)

    return <div className="video-container">
        <video className="video" muted autoPlay loop ref={videoRef}></video>
        <Danmu />
    </div>
}